public class Student {
    public String name;
    public int age;

    public Student(){
        System.out.println("不带参数的构造方法");
    }

    public Student(String name, int age) {
        System.out.println("带参数的构造方法");
        this.name = name;
        this.age = age;

    }

    public void setStudent(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public void printStudent() {
        System.out.println(this.name + "->" + this.age);
    }

    public static void main(String[] args) {
        Student student = new Student();
        //student.setStudent("zhangsan", 19);
        //student.printStudent();
    }
}

